<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Person hinzufügen</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <h1><h:outputText value="Person hinzufügen"/></h1>
                <p:panelGrid columns="2">
                 	<p:outputLabel value="Id:" for="id" />
                    <p:inputText id="personId" value="#{personController.person.id}" title="Id" disabled="true" />
                    <p:outputLabel value="Nachname:" for="nachname" />
                    <p:inputText id="nachname" value="#{personController.person.nachname}" title="Nachname" required="true" requiredMessage="Pflichtfeld."/>
                    <p:outputLabel value="Vorname:" for="vorname" />
                    <p:inputText id="vorname" value="#{personController.person.vorname}" title="Vorname" />
                </p:panelGrid>
                <p:commandButton value="Person erstellen" action="#{personController.doCreatePerson}"/>
            </h:form>
        </f:view>

    </h:body>
</html>
